import { createRouter, createWebHistory } from "vue-router";
import Layout from "../components/common/Layout.vue";

const routes = [
  {
    path: "/",
    component: Layout,
    children: [
      {
        path: "",
        name: "Home",
        component: () => import("../views/Home.vue"),
      },
      {
        path: "ticket",
        name: "Ticket",
        component: () => import("../views/Ticket.vue"),
      },
      {
        path: "config",
        name: "Config",
        component: () => import("../views/Config.vue"),
      },
      {
        path: "batch",
        name: "Batch",
        component: () => import("../views/Batch.vue"),
      },
      {
        path: "yzdyh",
        name: "Yzdyh",
        component: () => import("../views/Yzdyh.vue"),
      },
      {
        path: "njbwg",
        name: "Njbwg",
        component: () => import("../views/Njbwg.vue"),
      },
      {
        path: "statistics",
        name: "Statistics",
        component: () => import("../views/Statistics.vue"),
      },
      {
        path: "person-list/:taskId",
        name: "PersonList",
        component: () => import("../views/PersonList.vue"),
      },
    ],
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
